<template>
  <div>
    <van-search
      placeholder="请输入搜索内容"
      shape="round"
      v-model="value"
      @search="onSearch"
      @cancel="onCancel"
    ></van-search>
    <home-swiper></home-swiper>
    <home-grid></home-grid>
    <home-product></home-product>
    <home-new></home-new>
    <home-top></home-top>
  </div>
</template>

<script setup>
import { ref } from "vue";
import { Search } from "vant";
import { showToast } from "vant";
import HomeSwiper from "../components/HomeSwiper.vue";
import HomeGrid from "../components/HomeGrid.vue";
import HomeProduct from "../components/HomeProduct.vue";
import HomeNew from "../components/HomeNew.vue";
import HomeTop from "../components/HomeTop.vue";
const value = ref(""); // 输入框的值
const onSearch = (val) => showToast(val);
const onCancel = () => showToast("取消搜索");
</script>

<style></style>
